
a=0
t=""
b=0
kk=""
dictiondry1=dict()
dictiondry1["张三"]=[["数学",98],["语文",87],["物理",79]]
dictiondry1["李四"]=[["化学",86],["语文",97],["数学",69]]
dictiondry1["王五"]=[["化学",89],["语文",69],["数学",89]]
for k,v in dictiondry1.items():
    b=v[1][1]
    if b>a:
        a=b
        t=k

for k,v in dictiondry1.items():
    a=v[0][1]+v[1][1]+v[2][1]
    kk=k
    print("姓名是"+kk+"      总分：")
    print(a)

sorted_scores = {
    name: sorted(nu, key=lambda c: c[1], reverse=True)
    for name, nu in dictiondry1.items()
}

print('语文分数最高的是'+t)

for name, nu in sorted_scores.items():
    print(f"{name}: {nu}")

